return Some(candidate)
}
}
- return None
+ None
}
#[allow(deprecated)] // connect => join in 1.3
where F: FnMut(&mut MultiShell) -> io::Result<()>
{
match self.verbosity {
- Verbose => return callback(self),
+ Verbose => callback(self),
_ => Ok(())
}
}
{
match self.verbosity {
Verbose => Ok(()),
- _ => return callback(self)
+ _ => callback(self)
}
}
ret.to_doc_test = to_builds.iter().map(|&p| p.clone()).collect();
- return Ok(ret);
+ Ok(ret)
}
impl<'a> CompileFilter<'a> {
CompileMode::Build => build,
CompileMode::Doc { .. } => &profiles.doc,
};
- return match *filter {
+ match *filter {
CompileFilter::Everything => {
match mode {
CompileMode::Bench => {
}
Ok(targets)
}
- };
+ }
}
/// Read the `paths` configuration variable to discover all path overrides that
self.compilation.deps_output =
self.layout(root, Kind::Target).proxy().deps().to_path_buf();
- return Ok(());
+ Ok(())
}
/// Returns the appropriate directory layout for either a plugin or not.
}
}
assert!(ret.len() > 0);
- return Ok(ret);
+ Ok(ret)
}
/// For a package, return all targets which are registered as dependencies
}
}));
}
- return ret
+ ret
}
/// Returns the dependencies needed to run a build script.
if unit.target.is_bin() {
ret.extend(self.maybe_lib(unit));
}
- return ret
+ ret
}
/// If a build script is scheduled to be run for the package specified by
let prev = out.entry(*unit).or_insert(BuildScripts::default());
prev.to_link.extend(to_link);
prev.plugins.extend(plugins);
- return prev
+ prev
}
}
}
let ret = util::hash_u64(self);
*self.memoized_hash.lock().unwrap() = Some(ret);
- return ret
+ ret
}
fn compare(&self, old: &Fingerprint) -> CargoResult<()> {
_ => {}
}
- return url;
+ url
}
impl<'cfg> Debug for GitSource<'cfg> {
let loc = pkg.root();
try!(PathSource::walk(loc, &mut ret, true, filter));
}
- return Ok(ret);
+ Ok(ret)
}
fn walk(path: &Path, ret: &mut Vec<PathBuf>,
}
try!(PathSource::walk(&dir, ret, false, filter));
}
- return Ok(())
+ Ok(())
}
}
for src in self.sources.values() {
ret.extend(try!(src.get(packages)).into_iter());
}
- return Ok(ret);
+ Ok(ret)
}
fn fingerprint(&self, pkg: &Package) -> CargoResult<String> {
cwd.join(home)
});
let user_home = env::home_dir().map(|p| p.join(".cargo"));
- return cargo_home.or(user_home);
+ cargo_home.or(user_home)
}
fn walk_tree<F>(pwd: &Path, mut walk: F) -> CargoResult<()>
let ret = Sha256 { ctx: ctx };
let n = EVP_DigestInit_ex(ret.ctx, EVP_sha256(), 0 as *mut _);
assert_eq!(n, 1);
- return ret;
+ ret
}
}
let n = EVP_DigestFinal_ex(self.ctx, ret.as_mut_ptr(), &mut out);
assert_eq!(n, 1);
assert_eq!(out, 32);
- return ret;
+ ret
}
}
}
CryptCreateHash(ret.hcryptprov, CALG_SHA_256,
0, 0, &mut ret.hcrypthash)
});
- return ret;
+ ret
}
pub fn update(&mut self, bytes: &[u8]) {
&mut len, 0)
});
assert_eq!(len as usize, ret.len());
- return ret;
+ ret
}
}
impl GitRepo {
pub fn init(path: &Path, _: &Path) -> CargoResult<GitRepo> {
try!(git2::Repository::init(path));
- return Ok(GitRepo)
+ Ok(GitRepo)
}
pub fn discover(path: &Path, _: &Path) -> Result<git2::Repository,git2::Error> {
git2::Repository::discover(path)
impl HgRepo {
pub fn init(path: &Path, cwd: &Path) -> CargoResult<HgRepo> {
try!(process("hg").cwd(cwd).arg("init").arg(path).exec());
- return Ok(HgRepo)
+ Ok(HgRepo)
}
pub fn discover(path: &Path, cwd: &Path) -> CargoResult<HgRepo> {
try!(process("hg").cwd(cwd).arg("root").cwd(path).exec_with_output());
- return Ok(HgRepo)
+ Ok(HgRepo)
}
}